Skip to content

debugger: list and clear breakpoints set on functions - #66744

Open
dualfroz wants to merge 1 commit into
nodejs:mainfrom
dualfroz:fix/41790-function-breakpoints
Open

dualfroz wants to merge 1 commit into
nodejs:mainfrom
dualfroz:fix/41790-function-breakpoints

Conversation

@dualfroz

Copy link
Copy Markdown
Contributor

Fixes: #41790

picks up #53798 by @rotu (kept as co-author). sb('fn()') went
through debug() from the command line API, so there was no
breakpoint id to keep. it now uses Debugger.setBreakpointOnFunctionCall,
the breakpoint shows up in breakpoints as fn() and cb('fn()')
removes it. like before, these aren't restored after restart.
test-debugger-break needed a small update since the function
breakpoint is now listed and the pause reads break in.

`sb('fn()')` used the `debug()` command line API, which gives no
breakpoint id, so these breakpoints never showed up in `breakpoints`
and could not be removed with `cb`. Use
`Debugger.setBreakpointOnFunctionCall` instead and keep the breakpoint
in the list, so it is listed as `fn()` and can be cleared with
`cb('fn()')`.

Fixes: nodejs#41790
Co-authored-by: Dan Rose <danoftheroses@gmail.com>
Signed-off-by: dualfroz <me@dualfroz.com>
@nodejs-github-bot nodejs-github-bot added debugger Issues and PRs related to the Node.js command-line debugger. needs-ci PRs that need a full CI run. labels Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.48%. Comparing base (782a3ac) to head (583dedf).
⚠️ Report is 181 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #66744   +/-   ##
=======================================
  Coverage   90.47%   90.48%           
=======================================
  Files         791      791           
  Lines      277225   277232    +7     
  Branches    53313    53331   +18     
=======================================
+ Hits       250829   250855   +26     
+ Misses      16801    16789   -12     
+ Partials     9595     9588    -7     
Files with missing lines Coverage Δ
lib/internal/debugger/inspect_repl.js 91.71% <100.00%> (+0.36%) ⬆️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debugger Issues and PRs related to the Node.js command-line debugger. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"breakpoints" command not listing breakpoints: "No breakpoints yet"

2 participants